<#if spaceName?exists>
	<a href="${base}/user/index/">【${spaceName}】</a>
	<#else>
	<li><a href="${base}/regist/"><img src="${base}/images/nav12.gif" /></a></li>
	<li><a style="cursor:pointer;"  onClick="openLoginDialog()"><img src="${base}/images/nav11.gif" /></a></li>
</#if>
	<div id="login_div" style="position:absolute;z-index:1000000;width:570px;display:none;border:1px solid;background:#ffffff;padding:10px;border:1px solid #bfbfbf;font-size:13px; text-align:center;">
	<div class="bgff" style="width:550px; height:232px " >
		<form id="loginForm" name="loginForm" method="post" action="${base}/login!login" >
		<div  class="color6 font13 l">
			<table cellpadding="0" cellspacing="10" border="0">
				<tr>
					<td width="60px" align="right" >E-Mail:</td>
					<td align="left"><input id="login_email" type="text" class="dl_input"  size="35"  name="user.email"/></td>
				</tr>
				<tr>
					<td  align="right" >密码:</td>
					<td align="left"><input id="login_password" type="password" class="dl_input"  size="35" name="user.password" /></td>
				</tr>
				<#--<tr>
					<td  align="right" ></td>
					<td align="left"><span id="pass_message"><input type="radio" name="o" class="bgff" />个人MOKO&nbsp;<input type="radio" name="o" class="bgff" />机构MOKO<br /><input type="checkbox"  class="bgff"/>记住登录状态</td>
				</tr>-->
				<tr>
					<td align="right" class="bga" ><a href="#" hidefocus  class="color9">忘记密码</a></td><td align="center"><Div style="background-color:#ff0198; width:256px; height:42px"><div style="margin:3px; border:1px dashed #ffffff; text-align:center">
					<input type="button" onClick="login()" value="登录" class=" font14 weight700 colorf bodred"  style="padding:5px 30px; background:#ff0198; " hidefocus onfocus="this.blur()"/></div></div></td>
				</tr>
				<tr>
					<td align="right" ></td>
					<td align="center">
						<input type="button" value="注册"  class="bgff font14 weight700 mainColor bodredd"  style="padding:10px 70px;" onClick="window.location= '${base}/regist'"/>
					</td>
				</tr>
			</table>
		</div>
		<div class="r" style="margin-top:11px"><img  src="${base}/images/loginr0.jpg" /></div>
		</form>
	</div>
	</div>
<script>
	function openLoginDialog(){
		dialog("登陆", "id:login_div", "580px", "260px", "id");
	}
function login(){
    $.ajax({
        type: "post",
        dataType: "json",
        url: base + "/login!check?time=" + new Date().getTime(),
        async: false,
        data: {
            "user.email": $("#login_email").val(),
            "user.password": $("#login_password").val()
        },
        success: function(pass){
            if (pass == "2") {
                $("#pass_message").html("");
                $("#loginForm").submit();
            }
            else {
                $("#pass_message").html("用户、邮箱或密码有误");
            }
        }
    });
}
</script>